package mychat.util;

import java.util.Date;
import java.util.regex.Pattern;

import mychat.vo.User;

public class UserFactory {
	public static User getUser(String s){
		Pattern pattern=Pattern.compile(";");
		String[] result =pattern.split(s,5);
		User user=new User();
		user.setName(result[0]);
		user.setPassword(result[1]);
		user.setEmail(result[2]);
		user.setDate(new Date(result[3]));
		user.setPro(result[4]);
		return user;
	}
}
